package cn.qicaiwang.open.app.dto;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 利率换算DTO
 */
@Data
public class InterestRateConversionDTO {
    @NotNull(message = "利率不能为空")
    @DecimalMin(value = "0", message = "利率不能小于0")
    private BigDecimal rate;      // 利率

    @NotBlank(message = "原利率类型不能为空")
    private String fromType;      // 原利率类型(annual/monthly/daily)

    @NotBlank(message = "目标利率类型不能为空")
    private String toType;       // 目标利率类型(annual/monthly/daily)
}
